#include<stdio.h>
#pragma warning(disable:4996)
int main()
{
	int x;
	//scanf("%d", &x);
	x = 12345;
	int ret = 0;
	int digital;
	while (x > 0){
		digital = x % 10;
		//digital /= 10;
		ret = ret * 10 + digital;
		printf("x=%d,digital=%d,ret=%d\n", x, digital, ret);
		x /= 10;
	}
	printf("%d", ret);
	return 0;
}
